home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1986 July & August
/
rerun-1986-07-08.d64
/
disk keeper
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
8KB
|
215 lines
100 rem f$ and d$ must be first two program variables!
110 f$="":dimd$(200),d%(200):pr=4:elite=0:a$="-":b$=":"
120 poke53280,0:poke53281,0:fork=1to80:bl$=bl$+" ":next:bb$=mid$(bl$,1,9)
130 dimtp$(4):tp$(1)=" seq":tp$(2)=" prg":tp$(3)=" usr":tp$(4)=" rel"
140 dime$(2):e$(0)="":e$(1)=" ":e$(2)=" "
150 gosub9100:r=12:c=7:gosub9000:print"please wait--initializing";
160 j=0:fork=49152to49364:readn:j=j+n:pokek,n:next:poke49248,4
170 ifj<>29842thenprint"error in data statements 10000-10110:end
180 j[178]0:[129]k[178]828[164]866:[135]n:j[178]j[170]n:[151]k,n:[130]
190 [139]j[179][177]6665[167][153]"error in data statements 20000-20020:end
200 j=0:fork=50000to50098:readn:j=j+n:pokek,n:next
210 ifj<>14887thenprint"error in data statements 30000-30050:end
220 [141]9000:[153]bl$
230 [141]9100:[141] 9200
240 [145] x [137]6500,3000,8500,7100,7200,7500,5500,5000,9999
3000 [141]9100:[153][163]12)"make disk label":[141]9500:[139]er[177]19[167]230
3010 [153][163]12)"1) jacket insert"
3020 [153][163]12)"2) full jacket"
3030 [153][163]11)"choose format: cmdcmd";:[141]9090:w[178]1:[141]8000:x[178][197](s$)
3040 [139]s$[178]"1"[176]s$[178]"2"[167]3070
3050 [139]s$[178]""[167]230
3060 [153]:[153][163]4)"choose a number between 1 and 2ononon":[137]3030
3070 g[178][197](s$)[171]1
3080 [153][163]4)" type in optional label string ":r[178]14:c[178]8:w[178]24:[141]8000
3090 l$[178]s$:ff[178]1
3100 [141]9090:[153][163]11)"reading directory":[141]6000
3110 [141]9400:[151]781,r:[158]828:[153][163]16)"printing"
3120 [160]4:[159]4,pr:x$[178]"":[129]k[178]1[164]9:x$[178]x$[170]a$:[130]
3130 y$[178]b$[170]" ":z$[178]" "[170]b$:ww[178]54:d$(nf[170]1)[178][202](bl$,1,25):lm[178]22
3140 d$(nf[170]2)[178]d$(nf[170]1):[139]g[167]lm[178]lm[171]4:g[178]g[170]el:ww[178]ww[170]2[172][195](e$(g))
3150 [139][195](l$)[179]ww[171]2[172][195](e$(g))[171]29[167]l$[178]l$[170]"close":[137]3150
3160 f$[178]n$:[158]50046:[141]3500:[141]3600:[139]g[167][152]4,y$;
3170 l$[178]b$[170]e$(g)[170]" "[170]f$[170]e$(g)[170]" "[170]l$[170]b$:[152]4,l$;:[139]g[167][152]4,z$;
3180 [152]4:[141]3600:[141]3500:[141]3600:j[178][181](nf[173]2):[139]j[178]0[167]j[178]1
3190 [129]m[178]1[164]j:[139]g[167][152]4,y$;
3200 f$[178]d$(m):[158]50046:h$[178]f$:f$[178]d$(m[170]j):[158]50046
3210 [152]4,b$;e$(g);h$" "f$;e$(g);b$;:[139]g[167][152]4,z$;
3220 [152]4:[139]m[179][177]17[176]g[178]0[167]3240
3230 [139]m[179][177]j[167][141]3600:[141]3500:y$[178]bb$:z$[178]y$:[141]3600:ff[178]0
3240 [130]m:[141]3800:[129]m[178]m[164]lm:[141]3600:[130]
3250 [139]ff[167][141]3500:[139]g[178]0[167]3290
3260 [139]g[178]0[167]3290
3270 g[178]0:[129]m[178]m[164]lm[170]27:[152]4,bb$;:[141]3600:[130]
3280 [152]4,bb$;:[141]3500
3290 [152]4:[160]4:[137]230
3500 [139]g[167][152]4,x$;
3510 [129]k[178]1[164]ww:[152]4,a$;:[130]:[139]g[167][152]4,x$;
3520 [152]4:[142]
3600 [139]g[167][152]4,y$;
3610 [152]4,b$;:[152]4,[202](bl$,1,ww[171]2);:[152]4,b$;:[139]g[167][152]4,z$;
3620 [152]4:[142]
3800 [141]3600:[139]g[167][152]4,y$;
3810 x[178](ww[171]17)[173]2:[152]4,b$[202](bl$,1,x)[202](bl$,1,4[171][195]([196](bf)));
3820 [152]4,bf"blocks free"[202](bl$,1,ww[171]x[171]17);b$;:[139]g[167][152]4,z$;
3830 [152]4:m[178]m[170]2:[142]
5000 [141]9100:[153][163]11)"send disk command"
5010 [153]" type disk command and press return"
5020 r[178]10:c[178]2:w[178]36:[141]8000:[139]s$[178]""[167]230
5030 [141]9500:[152]15,s$:[141]9600
5040 [139]er[177]19[167][160]15:[137]230
5050 [153]:[153][163]19)"ok":x$[178][202](s$,1,1)
5060 [139]x$[178]"v"[176]x$[178]"s"[176]x$[178]"r"[176]x$[178]"n"[176]x$[178]"c"[167]nn$[178]""
5070 [160]15:[141]9800:[137]230
5500 [141]9100:[153][163]12)"format new disk"
5510 [153][163]8)"enter name for new disk":
5520 r[178]10:c[178]11:w[178]16:[141]8000:[139]s$[178]""[167]230
5530 sn$[178]s$:[153]" enter unique two character disk id"
5540 r[178]14:c[178]18:w[178]2:[141]8000:[139]s$[178]""[167]230
5550 [139][195](s$)[179][177]2[167][153]"ononononon":[137]5530
5560 sd$[178]s$:[153][163]5)"warning! formatting will erase"
5570 [153][163]5)"any existing files on the disk!"
5580 [153][163]8)"proceed with format?":r[178]19:c[178]30:w[178]1:[141]8000
5590 [139]s$[179][177]"y"[167]230
5600 [141]9700:[153][163]9)"formatting in progress"
5610 [160]15:[159]15,8,15:[152]15,"new0:"sn$","sd$:[160]15:nn$[178]"":[137]230
5999 [143] read disk directory into d$
6000 [141]9500:[139]er[167]230
6010 [141]8200:t[178]18:s[178]1:[139]n$[178]nn$[175]fp[178]0[167][160]3:[142]
6020 nn$[178]n$:[139]fp[178]0[167]nf[178]0
6030 [152]15,"b-p:3,4":bf[178]0:[129]k[178]1[164]35:[161]#3,x$
6040 [139]x$[179][177]""[175]k[179][177]18[167]bf[178]bf[170][198](x$)
6050 [161]#3,x$:[161]#3,x$:[161]#3,x$:[130]
6060 tt[178]t:ss[178]s:[152]15,"b-r:3,0";t;s:[152]15,"b-p:3,0"
6070 [161]#3,t$:t[178]0:[139]t$[179][177]""[167]t[178][198](t$)
6080 [161]#3,s$:s[178]0:[139]s$[179][177]""[167]s[178][198](s$)
6090 [129]k[178]0[164]7:[152]15,"b-p:3";k[172]32[170]2:[161]#3,x$:[139]x$[178]""[167]6210
6100 w[178][198](x$):y$[178]tp$(w[175]7):[139](w[175]128)[179][177]128[167]y$[178]"*"[170][202](y$,2)
6110 [139](w[175]64)[178]64[167]y$[178]y$[170]"<":[137]6130
6120 y$[178]y$[170]" "
6130 [152]15,"b-p:3";k[172]32[170]30:[161]#3,x$:b[178][198](x$):[161]#3,x$
6140 [139]x$[179][177]""[167]b[178]b[170]256[172][198](x$)
6150 c$[178][202]([196](b),2):[139][195](c$)[179]3[167]c$[178][202](" ",1,3[171][195](c$))[170]c$
6160 [152]15,"b-p:3";k[172]32[170]5:[158]50000:[139]f$[179][177]ff$[176]fp[178]0[167]6200
6170 [152]15,"b-p:3";k[172]32[170]2:ex[178]0
6180 x[178]w[176]64:[139]fp[178]2[167]x[178]w[175]191
6190 [152]3,[199](x);:[152]15,"b-p:3,0":[152]15,"u2:3,0";tt;ss:[142]
6200 [139]fp[178]0[167]nf[178]nf[170]1:d$(nf)[178]c$[170]" "[170]f$[170]y$
6210 [130]k:[139]t[179][177]0[167]6060
6220 [160]3:[160]15:[142]
6500 [141]9100:[153][163]11)"display directory"
6510 [153][163]11)"reading directory":[141]6000:[141]9700
6520 [141]9400:k[178]1
6530 [141]9700:[153][163]11)""n$"":j[178]0:[139]nf[179]1[167]6550
6540 [153][163]7)d$(k):k[178]k[170]1:j[178]j[170]1
6550 [139] k[179][178]nf [175] j[179][177]10 [167]6540
6560 [139]k[177][178]nf[167][153][163]12)""bf"blocks free"
6570 [141] 9800:[139]x$[178]"*"[167]230
6580 [139]x$[178]"on"[176]x$[178]"^"[167]k[178]k[171]20:[139]k[179]1[167]k[178]1
6590 [139](k[179]nf)[176](k[178]1[175]x$[178]"on")[167]6530
6600 [137]230
7100 fp[178]1:p$[178]"protect":[137]7210
7200 fp[178]2:p$[178]"unprotect"
7210 [141]9100:[153][163]14[171]fp)""p$" file":[153][163]3[171]fp)"file to "p$": "
7220 w[178]16:r[178]10:c[178]21:[141]8000:ex[178]1:ff$[178]s$:sx$[178]s$:[139]s$[178]""[167]230
7230 [139][195](ff$)[179]16[167]ff$[178]ff$[170][199](160):[137]7230
7240 [141]6000:[153]
7250 [139]ex[178]0[167][153][163]13[171]fp[171][195](sx$)[173]2)""sx$" is now "p$"ed":nn$[178]"":[137]7270
7260 [153][163]11[171][195](sx$)[173]2)""sx$" is not on the disk"
7270 fp[178]0:[160]3:[160]15:[141]9800:[137]230
7500 [141]9100:[153][163]14)"rename disk":[141]9500:[139]er[177]19[167]230
7510 [141]8200:[153][163]11[171][195](n$)[173]2)"current disk name: "n$
7520 [153][163]7)"please input new disk name":r[178]13:c[178]12:w[178]16:[141]8000
7530 [139][195](s$)[178]0[167][160]3:[160]15:[137]230
7540 [139][195](s$)[179]16[167]s$[178]s$[170][199](160):[137]7540
7550 [152]15,"b-p:3,144":[152]3,s$;:[152]15,"u2:3,0,18,0":[160]3
7560 [141]9600:[139]er[177]19[167][160]3:[160]15:[137]230
7570 [153]:[153][163]9)"disk has been renamed":[152]15,"i0:":[160]15
7580 [129]k[178]1[164]3000:[130]:[137]230
8000 [141]9000:[153]"cmd>"[202](bl$,1,w)"wait<";:[141]9000:n[178]0:s$[178]""
8010 [151]204,0:[161]x$:[139]x$[178]""[167]8010
8020 [151]204,1:[151]212,0:x[178][198](x$):[139]x[179][177]13[167]8050
8030 [153]" ";:[139][195](s$)[178]w[167][153]"cmdwait<";
8040 [153]:[142]
8050 [139]x[179][177]20[176]n[178]0[167]8090
8060 n[178]n[171]1:s$[178][202](s$,1,n):[141]9000:[153]""s$;:[151]212,0:[153]"closeclosecmd";
8070 [139][195](s$)[178]w[171]1[167][153]"wait<";
8080 c[178]c[170]n:[141]9000:c[178]c[171]n:[137]8010
8090 [139]n[178]w[167]8010
8100 [139](x[177]31[175]x[179]129)[176](x[177]161)[167][153]x$;:s$[178]s$[170]x$:n[178]n[170]1
8110 [137]